import 'CameraPreviewSize.dart';
import 'EnumDefine.dart';

class CameraStreamingSetting {
  static const String FOCUS_MODE_AUTO = "auto";
  static const String FOCUS_MODE_CONTINUOUS_PICTURE = "continuous-picture";
  static const String FOCUS_MODE_CONTINUOUS_VIDEO = "continuous-video";

  final CAMERA_FACING_ID cameraId;
  final CameraPreviewSize cameraPreviewSize;
  final bool continuousFocusModeEnabled;
  final String focusMode;
  final bool frontCameraMirror;
  final bool recordingHint;
  final int resetTouchFocusDelayInMs;

  CameraStreamingSetting({
    this.cameraId, 
    this.cameraPreviewSize, 
    this.continuousFocusModeEnabled, 
    this.focusMode, 
    this.frontCameraMirror, 
    this.recordingHint, 
    this.resetTouchFocusDelayInMs
  });

  Map<String, dynamic> toJson() {
    return {
      "cameraId": cameraId?.index,
      "cameraPreviewSize": cameraPreviewSize?.toJson(),
      "continuousFocusModeEnabled": continuousFocusModeEnabled,
      "focusMode": focusMode,
      "frontCameraMirror": frontCameraMirror,
      "recordingHint": recordingHint,
      "resetTouchFocusDelayInMs": resetTouchFocusDelayInMs,
    };
  }
}